home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / prism127.arc / ~MATH.PGE (.txt) < prev    next >
Microsoft Windows Help File Content  |  1990-08-01  |  2KB  |  47 lines

  1. :begin
  2. >.v_exist[a#] .then[intro]
  3. >.define[a#] .define[b#] .define[c#]
  4. >.define[a]
  5. >.window[]
  6. >intro
  7. :Intro
  8.  Iris uses two types of variables: text and numeric.
  9.  Iris also supports a number of arithmetic and logical
  10.  operators.
  11.  When numeric variables are being used, the operators use
  12.  their conventional meaning.  However, when text variables
  13.  are being used the meaning of the operators is slightly
  14.  different.
  15.  You can mix numeric and text variables in a calculation or
  16.  comparison whenever you want.  Which "type" of operation
  17.  takes place -- text or numeric -- depends on the variable
  18.  first mentioned.  Variables of another type are converted
  19.  to the "base" type.
  20.  If a text variable needs to be converted to a numeric
  21.  variable, but contains no numerals, zero is used.
  22.  Here are some sample calculations.
  23. :calcs
  24. >a#=10 b#=20 c#=30 a=10
  25.  numeric                   text
  26.  -------                   ----
  27.  a# = ^a#                 | a = ^a
  28. >a#+1 a+1
  29.  add:      a# + 1 = ^a#   | append:   a + 1 = ^a
  30. >a#-1 a-1
  31.  subtract: a# - 1 = ^a#   | delete:   a - 1 = ^a
  32. >a#*2 a*2
  33.  multiply: a# * 2 = ^a#   | fill:     a * 2 = ^a
  34. >a#/2 a/2
  35.  divide:   a# / 2 = ^a#   | withdraw: a / 2 = ^a
  36. >.pause
  37. >a#=^b#+^c# a=^b#+^c#
  38.  numeric                           text
  39.  -------                           ----
  40.  a# = b# + c# .. ^a# = ^b# + ^c#    | a = b# + c# .. ^a = ^b# + ^c#
  41. >a#=^b#-^c# a=^b#-^c#
  42.  a# = b# - c# .. ^a# = ^b# - ^c#   | a = b# - c# .. ^a = ^b# - ^c#
  43. >a#=^b#*^c# a=^b#*^c#
  44.  a# = b# * c# .. ^a# = ^b# * ^c#   | a = b# * c# .. ^a = ^b# * ^c#
  45. >a#=^b#/^c# a=^b#/^c#
  46.  a# = b# / c# .. ^a# = ^b# / ^c#     | a = b# / c# .. ^a = ^b# / ^c#
  47.